<template>
  <view class="form_container">
    <wd-form ref="formC" :model="fromModal" :rules="rulesC">
      <wd-cell-group custom-class="group" title="饮酒与饮食" border>
        <wd-cell
          prop="weeklyBeer"
          title="1.1.2.每周啤酒饮酒量"
          required
          size="large"
          custom-value-class="cell-left"
          vertical
        >
          <wd-input
            required
            clearable
            size="large"
            v-model="fromModal.weeklyBeer"
            type="number"
            placeholder="请输入"
            @blur="onBlurCheckoutRule('weeklyBeer', true)"
          >
            <template #suffix>
              <text>瓶</text>
            </template>
          </wd-input>
        </wd-cell>
        <wd-cell
          prop="beerYears"
          title="1.1.3.啤酒饮酒年限"
          required
          size="large"
          custom-value-class="cell-left"
          vertical
        >
          <wd-input
            required
            clearable
            size="large"
            v-model="fromModal.beerYears"
            type="number"
            placeholder="请输入"
            @blur="onBlurCheckoutRule('beerYears', true)"
          >
            <template #suffix>
              <text>年</text>
            </template>
          </wd-input>
        </wd-cell>
      </wd-cell-group>
    </wd-form>
  </view>
</template>

<script lang="ts" setup>
const fromModal = ref({
  weeklyBeer: "",
  beerYears: "",
});
const onBlurCheckoutRule = () => {
  console.log("触发失焦");
};
</script>
<style></style>

<route type="home" lang="json">
{
  "layout": "tabbar",
  "name": "home",
  "style": {
    "navigationBarTitleText": "home"
  }
}
</route>
